package com.flin.icesilkworm.examination.app;


//import org.jdbc.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.PropertySources;
import com.flin.icesilkworm.framework.cache.RedisTemplateCache;
import com.flin.icesilkworm.framework.contants.AuthLoginUser;
import com.flin.icesilkworm.framework.spring.filter.GlobalFilter;
/**
 * 启动类
 *
 */ 
@SpringBootApplication(scanBasePackages = { "com.flin.icesilkworm" }, scanBasePackageClasses = {RedisTemplateCache.class })
@ServletComponentScan(basePackageClasses = { GlobalFilter.class })
@PropertySources(value={
})
public class ExamSpringWebBootApplication extends SpringBootServletInitializer {
	public static void main(String[] args) {//单例模式下读取服务默认配置，无需重新打包常用的配置文件，
		if(args != null && args.length > 0) {
			SpringApplication.run(ExamSpringWebBootApplication.class, args);//new String[]{"--spring.config.location=" + args[0]});
			
		} else {
			SpringApplication.run(ExamSpringWebBootApplication.class, new String[]{"--spring.config.location=file:/home/flin_configs/examination/application.yml"});
			AuthLoginUser.closeAuth = false;
		}
		 
 
	
	}
	
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(ExamSpringWebBootApplication.class);
	}

}
